"""meiduo_mall URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.conf.urls import url, include
    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import url
from django.contrib import admin

from apps.ausers import views

urlpatterns = [
   #1.注册页面
   url(r"^register/$",views.RegisterView.as_view(),name="register"),
   #2.判断用户名是否重复
   url(r"^usernames/(?P<username>[a-zA-Z0-9_-]{5,20})/count/$",views.UsernameCountView.as_view(),name="usernamecount"),
   #3.判断手机号是否重复
   url(r"^mobiles/(?P<mobile>1[3-9]\d{9})/count/$",views.MobileCountView.as_view(),name="mobile"),
   #4.登陆功能
   url(r"^login/$",views.LoginView.as_view(),name="login"),
   #5.退出功能
   url(r"^logout/$",views.LogoutView.as_view(),name="logout"),
   #6.个人中心
   url(r"^info/$",views.UserInfoView.as_view(),name="info"),
]
